using System;

namespace woaC2.SocketLib
{
    /// <summary>
    /// Recieves and send messages.
    /// </summary>
    public interface IMessageServer
    {
        /// <summary>
        /// Occurs when new client has connected
        /// </summary>
        event EventHandler<ClientStatusChangedEventArgs> ClientConnected;

        /// <summary>
        /// Occurs when client has disconnected
        /// </summary>
        event EventHandler<ClientStatusChangedEventArgs> ClientDisconnected;

        /// <summary>
        /// Occurs when new message has been recieved
        /// </summary>
        event EventHandler<MessageRecievedEventArgs> MessageRecieved;

        ushort MaxCCU
        {
            get;
            set;
        }

        ushort CCU
        {
            get;
        }
        /// <summary>
        /// </summary>
        /// <param name="sessionId">
        /// </param>
        /// <param name="message">
        /// </param>
        void SendMessageToClient(Guid sessionId, byte[] message);

        /// <summary>
        /// Start listnening for incoming messages.
        /// </summary>
        void Start();

        /// <summary>
        /// Stop listening for incoming messages.
        /// </summary>
        void Stop();
    }
}